Home
last modified time | relevance | path

Searched hist:b506e0f1 (Results 1 – 2 of 2) sorted by relevance

/qemu/include/sysemu/
H A Diothread.hb506e0f1 Wed Mar 06 11:55:29 GMT 2019 Peter Xu <peterx@redhat.com> iothread: create the gcontext unconditionally

In existing code we create the gcontext dynamically at the first
access of the gcontext from caller. That can bring some complexity
and potential races during using iothread. Since the context itself
is not that big a resource, and we won't have millions of iothread,
let's simply create the gcontext unconditionally.

This will also be a preparation work further to move the thread
context push operation earlier than before (now it's only pushed right
before we want to start running the gmainloop).

Removing the g_once since it's not necessary, while introducing a new
run_gcontext boolean to show whether we want to run the gcontext.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20190306115532.23025-3-peterx@redhat.com
Message-Id: <20190306115532.23025-3-peterx@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
/qemu/
H A Diothread.cb506e0f1 Wed Mar 06 11:55:29 GMT 2019 Peter Xu <peterx@redhat.com> iothread: create the gcontext unconditionally

In existing code we create the gcontext dynamically at the first
access of the gcontext from caller. That can bring some complexity
and potential races during using iothread. Since the context itself
is not that big a resource, and we won't have millions of iothread,
let's simply create the gcontext unconditionally.

This will also be a preparation work further to move the thread
context push operation earlier than before (now it's only pushed right
before we want to start running the gmainloop).

Removing the g_once since it's not necessary, while introducing a new
run_gcontext boolean to show whether we want to run the gcontext.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20190306115532.23025-3-peterx@redhat.com
Message-Id: <20190306115532.23025-3-peterx@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>